//
//  RootModel.m
//  UI_homework_22_QQ音乐界面和阿里星球界面
//
//  Created by li cheng on 16/8/14.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "RootModel.h"
#import "DataModel.h"
@implementation RootModel
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *mArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            DataModel *data = [DataModel modelWithDictionary:dic];
            [mArray addObject:data];
        }
        _data = mArray;
    }
}
+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [DataModel class]};
}
@end
